From 98e2295efc2dbe61b43e83d3d5c65d76505b5bf1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 27 Jan 2007 05:34:05 +0000 Subject: [PATCH] Add deprecation guards for gtk_rc_style_ref/unref and the old file 2007-01-27 Matthias Clasen * gtk/gtkfilesel.h: * gtk/gtkrc.h: * gtk/gtk.symbols: Add deprecation guards for gtk_rc_style_ref/unref and the old file selector. (#348256) svn path=/trunk/; revision=17223 --- ChangeLog | 7 ++++ docs/reference/ChangeLog | 4 ++ docs/reference/gtk/tmpl/gtkfilesel.sgml | 55 ++++++++++--------------- docs/reference/gtk/tmpl/gtkrc.sgml | 2 + gtk/gtk.symbols | 4 ++ gtk/gtkfilesel.h | 4 ++ gtk/gtkrc.h | 3 ++ 7 files changed, 45 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index a32fd23296..a38322636c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-01-27 Matthias Clasen + + * gtk/gtkfilesel.h: + * gtk/gtkrc.h: + * gtk/gtk.symbols: Add deprecation guards for gtk_rc_style_ref/unref + and the old file selector. (#348256) + 2007-01-26 Matthias Clasen * gtk/gtkiconview.c: Documentation fixes (#400530, Anders Brander) diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index aa847441ec..d675392968 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,7 @@ +2007-01-27 Matthias Clasen + + * gtk/sgml/gtkfilesel.sgml: Add deprecation information. + 2007-01-08 Matthias Clasen * gtk/tmpl/gtkentry.sgml: Expand deprecation notes for diff --git a/docs/reference/gtk/tmpl/gtkfilesel.sgml b/docs/reference/gtk/tmpl/gtkfilesel.sgml index c660c4971c..2d65b2e6d3 100644 --- a/docs/reference/gtk/tmpl/gtkfilesel.sgml +++ b/docs/reference/gtk/tmpl/gtkfilesel.sgml @@ -6,6 +6,10 @@ Prompt the user for a file or directory name +#GtkFileSelection has been superseded by the newer #GtkFileChooser family +of widgets. + + #GtkFileSelection should be used to retrieve file or directory names from the user. It will create a new dialog window containing a directory list, and a file list corresponding to the current working directory. The filesystem @@ -93,53 +97,35 @@ void create_file_selection (void) { The #GtkFileSelection struct contains the following #GtkWidget fields: - - - - - - -*fileop_dialog; -the dialog box used to display the #GtkFileSelection. It can be customized by adding/removing widgets from it using the standard #GtkDialog functions. - - - -*ok_button, *cancel_button; -the two main buttons that signals should be connected to in order to perform an action when the user hits either OK or Cancel. - - - -*history_pulldown; -the #GtkOptionMenu used to create the drop-down directory history. - - - -*fileop_c_dir, *fileop_del_file, *fileop_ren_file; -the buttons that appear at the top of the file selection dialog. These "operation buttons" can be hidden and redisplayed with gtk_file_selection_hide_fileop_buttons() and gtk_file_selection_show_fileop_buttons() respectively. - - - - +@fileop_dialog: the dialog box used to display the #GtkFileSelection. + It can be customized by adding/removing widgets from it using the + standard #GtkDialog functions. +@ok_button: +@cancel_button: the two main buttons that signals should be connected + to in order to perform an action when the user hits either OK or + Cancel. +@history_pulldown: the #GtkOptionMenu used to create the drop-down + directory history. +@fileop_c_dir: +@fileop_del_file: +@fileop_ren_file: the buttons that appear at the top of the file + selection dialog. These "operation buttons" can be hidden and + redisplayed with gtk_file_selection_hide_fileop_buttons() and + gtk_file_selection_show_fileop_buttons() respectively. + @dir_list: @file_list: @selection_entry: @selection_text: @main_vbox: -@ok_button: -@cancel_button: @help_button: -@history_pulldown: @history_menu: @history_list: -@fileop_dialog: @fileop_entry: @fileop_file: @cmpl_state: -@fileop_c_dir: -@fileop_del_file: -@fileop_ren_file: @button_area: @action_area: @@ -165,6 +151,7 @@ Creates a new file selection dialog box. By default it will contain a #GtkTreeVi @title: a message that will be placed in the file requestor's titlebar. @Returns: the new file selection. +@Deprecated: Use gtk_file_chooser_dialog_new() instead diff --git a/docs/reference/gtk/tmpl/gtkrc.sgml b/docs/reference/gtk/tmpl/gtkrc.sgml index 0cfd2710a6..13a5ac1687 100644 --- a/docs/reference/gtk/tmpl/gtkrc.sgml +++ b/docs/reference/gtk/tmpl/gtkrc.sgml @@ -1064,6 +1064,7 @@ Increments the reference count of a #GtkRcStyle. @rc_style: a #GtkRcStyle +@Deprecated: Use g_object_ref() instead @@ -1073,5 +1074,6 @@ frees if the result is 0. @rc_style: a #GtkRcStyle +@Deprecated: Use g_object_unref() instead diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index e4b382f1c1..cabc850feb 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -1489,6 +1489,7 @@ gtk_file_system_win32_new #if IN_HEADER(__GTK_FILESEL_H__) #if IN_FILE(__GTK_FILESEL_C__) +#ifndef GTK_DISABLE_DEPRECATED gtk_file_selection_complete gtk_file_selection_get_filename PRIVATE #ifdef G_OS_WIN32 @@ -1510,6 +1511,7 @@ gtk_file_selection_set_select_multiple gtk_file_selection_show_fileop_buttons #endif #endif +#endif #if IN_HEADER(__GTK_FIXED_H__) #if IN_FILE(__GTK_FIXED_C__) @@ -3021,10 +3023,12 @@ gtk_rc_set_default_files_utf8 gtk_rc_style_copy gtk_rc_style_get_type G_GNUC_CONST gtk_rc_style_new +#ifndef GTK_DISABLE_DEPRECATED gtk_rc_style_ref gtk_rc_style_unref #endif #endif +#endif #if IN_HEADER(__GTK_RECENT_CHOOSER_H__) #if IN_FILE(__GTK_RECENT_CHOOSER_C__) diff --git a/gtk/gtkfilesel.h b/gtk/gtkfilesel.h index e22eb77765..75f65a16d1 100644 --- a/gtk/gtkfilesel.h +++ b/gtk/gtkfilesel.h @@ -24,6 +24,8 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#ifndef GTK_DISABLE_DEPRECATED + #ifndef __GTK_FILESEL_H__ #define __GTK_FILESEL_H__ @@ -121,3 +123,5 @@ G_END_DECLS #endif /* __GTK_FILESEL_H__ */ + +#endif /* GTK_DISABLE_DEPRECATED */ diff --git a/gtk/gtkrc.h b/gtk/gtkrc.h index d107df1936..e14277719d 100644 --- a/gtk/gtkrc.h +++ b/gtk/gtkrc.h @@ -168,8 +168,11 @@ void gtk_rc_add_class_style (GtkRcStyle *rc_style, GType gtk_rc_style_get_type (void) G_GNUC_CONST; GtkRcStyle* gtk_rc_style_new (void); GtkRcStyle* gtk_rc_style_copy (GtkRcStyle *orig); + +#ifndef GTK_DISABLE_DEPRECATED void gtk_rc_style_ref (GtkRcStyle *rc_style); void gtk_rc_style_unref (GtkRcStyle *rc_style); +#endif gchar* gtk_rc_find_module_in_path (const gchar *module_file); gchar* gtk_rc_get_theme_dir (void); -- 2.30.2